package com.jic.market.api.manage;

import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.market.request.manager.coupon.template.CouponTemplateAddGoodsTriggerRequest;
import com.jic.market.request.manager.coupon.template.CouponTemplateAddRequest;
import com.jic.market.request.manager.coupon.template.CouponTemplateAddTriggerRequest;
import com.jic.market.request.manager.coupon.template.CouponTemplateDeleteGoodsRequest;
import com.jic.market.request.manager.coupon.template.CouponTemplateDeleteRequest;
import com.jic.market.request.manager.coupon.template.CouponTemplateEditRequest;
import com.jic.market.request.manager.coupon.template.CouponTemplateListQueryRequest;
import com.jic.market.request.manager.coupon.template.TemplateRequest;
import com.jic.market.response.CouponConfigQueryResponse;
import com.jic.market.response.manager.coupon.template.CouponTemplateListQueryResponse;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: gaolanyu
 * @date: 2020-03-02
 * @remark:
 */
@FeignClient(name = "jic-market", path = "/coupon/template")
public interface CouponTemplateApi {
    @PostMapping("/add-template")
    RestResult<String> addCouponTemplate(@RequestBody CouponTemplateAddRequest couponTemplateAddRequest);

    @PostMapping("/query-template")
    RestResult<CouponConfigQueryResponse> queryCouponTemplate(@RequestBody TemplateRequest templateRequest);

    @PostMapping("/add-template-type")
    RestResult<Boolean> addCouponTemplateFromType();

    @PostMapping("/add-template-goods")
    RestResult<Boolean> addCouponTemplateFromGoods(@RequestBody CouponTemplateAddGoodsTriggerRequest couponTemplateAddGoodsTriggerRequest);

    @PostMapping("/add-template-store")
    RestResult<Boolean> addCouponTemplateFromStore();

    @PostMapping("/add-template-trigger")
    RestResult<Boolean> addCouponTemplateFromTrigger(@RequestBody CouponTemplateAddTriggerRequest couponTemplateAddTriggerRequest);

    @PostMapping("/query-template-list")
    RestResult<PageResult<CouponTemplateListQueryResponse>> queryCouponTemplateList(@RequestBody CouponTemplateListQueryRequest couponTemplateListQueryRequest);

    @PostMapping("/delete-template")
    RestResult<Boolean> deleteCouponTemplate(@RequestBody CouponTemplateDeleteRequest couponTemplateDeleteRequest);

    @PostMapping("/edit-template")
    RestResult<Boolean> editCouponTemplate(@RequestBody CouponTemplateEditRequest couponTemplateEditRequest);

    @PostMapping("/delete-template-goods")
    RestResult<Boolean> deleteCouponTemplateGoods(@RequestBody CouponTemplateDeleteGoodsRequest couponTemplateDeleteGoodsRequest);

}
